package com.zx._03_并发.chapter_05_concurrent;

import java.util.concurrent.ConcurrentHashMap;
import lombok.extern.slf4j.Slf4j;

/**
 * ConcurrentHashMap
 */
@Slf4j
public class Demo_04 {

    public static void main(String[] args) {
        int total = 5000;
        ConcurrentHashMap<String, String> a = new ConcurrentHashMap<>();

        for (int i = 0; i < total; i++) {
            a.put(String.valueOf(i), String.valueOf(i));
        }
        log.info("ConcurrentHashMap={}", a.toString());
    }
}
